<?php

namespace app\controller;

class Base extends \app\BaseController
{
	public $aid;
	public $uid;
	public $user;
	public $mdid = 0;
	public $auth_data = "all";
	public $platform = "mp";
	public $xcxaid = 0;
	public function initialize()
	{
		$request = request();
		if ($request->controller() . "/" . $request->action() == "Backstage/index") {
// 			$this->checkauthkey();
		}
	}
	public function checkauthkey()
	{
// 		$domain = $_SERVER["HTTP_HOST"];
// 		$client = new \GuzzleHttp\Client(["timeout" => 5, "verify" => false]);
// 		try {
// 			$response = $client->request("POST", "https://www.diandashop.com/index/install2/checkdomain", ["form_params" => ["domain" => $domain]]);
// 			$rs = $response->getBody()->getContents();
// 			$rs = json_decode($rs, true);
// 			if ($rs && $rs["status"] == 0) {
// 				exit($rs["msg"]);
// 			}
// 		} catch (\Throwable $e) {
// 		}
	}
}